using System;
using System.Collections.Generic;
using System.Text;

namespace TMHuy.config
{
    public class Zone
    {
        public int x;
        public int y;
        public double distance;
        public string status;
        public string type;
        public int defend;
        public long lastSend;

        public Zone()
        {
            this.defend = int.MaxValue;
        }

        public string getXY()
        {
            return x.ToString() + "," + y.ToString();
        }

        public override bool Equals(object o)
        {
            if (o == null || o.GetType() != typeof(Zone))
                return false;
            Zone ca = (Zone)o;
            return ca.x.Equals(this.x) && ca.y.Equals(this.y);
        }

        public override int GetHashCode()
        {
            return (x.ToString()+","+y.ToString()).GetHashCode();
        }

    }
}
